@require "./common/variable"

hideBorder()
  &:not(:first-child, :last-child) 
    border-left-color $_border-color
    border-right-color $_border-color
  &:first-child 
    border-right-color $_border-color
  &:last-child 
    border-left-color $_border-color

group(radius)
  border-radius 0
  & > .tulp-base__wave
    border-radius 0
  &:not(:first-child) 
    margin-left -1px
  &:first-child
    border-top-left-radius radius
    border-bottom-left-radius radius
    & > .tulp-base__wave
      border-top-left-radius radius
      border-bottom-left-radius radius
  &:last-child
    border-top-right-radius radius
    border-bottom-right-radius radius
    & > .tulp-base__wave
      border-top-right-radius radius
      border-bottom-right-radius radius
  &:hover, &:focus 
    z-index 1
  &--primary
    hideBorder()
  &--success
    hideBorder()
  &--info
    hideBorder()
  &--warning
    hideBorder()
  &--error
    hideBorder()

.tulp-button-group 
  display inline-flex
  vertical-align middle
  box-sizing border-box
  & > .tulp-button 
    group($_border-radius)
  & > .is-round
    group($_border-radius-round)